﻿#if UNITY_EDITOR

using AI.Graph.Editor;
using UnityEditor;

[CustomEditor (typeof (TestCondition))]
public class TestConditionView : ConditionView {

    private SerializedProperty value;


    protected override void OnInspectorEnable () {
        value = serializedObject.FindProperty ("value");
    }


    public override void OnInspectorGUI () {
        OnNodeGUI ();
    }


    protected override void OnNodeGUI () {
        serializedObject.Update ();

        int newValue = EditorGUILayout.Popup ("Output", value.boolValue ? 0 : 1, new[] {"True", "False"});
        value.boolValue = newValue == 0;


        serializedObject.ApplyModifiedProperties ();
    }

}
#endif